home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmTextBox
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "Text Box Demo"
- ClientHeight = 4710
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 6600
- ClipControls = 0 'False
- Height = 5115
- Icon = 0
- Left = 1035
- LinkTopic = "Form2"
- ScaleHeight = 4710
- ScaleWidth = 6600
- Top = 1140
- Width = 6720
- Begin CUAEdit txt7
- BorderStyle = 3 'Inset
- DataField = "KommPort"
- DataSource = "Data1"
- Height = 300
- Left = 1830
- TabIndex = 13
- Text = "Text 7"
- Top = 3540
- Width = 1500
- End
- Begin CUAEdit txt6
- BorderStyle = 3 'Inset
- DataField = "KOD"
- DataSource = "Data1"
- Height = 300
- Left = 1830
- TabIndex = 15
- Text = "Integer"
- Top = 3870
- Width = 1500
- End
- Begin CUAEdit txt5
- BorderStyle = 3 'Inset
- DataField = "BOOL"
- DataSource = "Data1"
- Height = 300
- Left = 1830
- TabIndex = 11
- Text = "Bool"
- Top = 3210
- Width = 1500
- End
- Begin CUAEdit txt4
- BorderStyle = 3 'Inset
- DataField = "PM"
- DataSource = "Data1"
- Height = 300
- Left = 225
- TabIndex = 16
- Text = "PM"
- Top = 4200
- Width = 1500
- End
- Begin Data Data1
- Caption = "CUACTLS.MDB"
- Connect = ""
- DatabaseName = "C:\BP\CUACTLS\CUACTLS.MDB"
- Exclusive = 0 'False
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 270
- Left = 1845
- Options = 0
- ReadOnly = 0 'False
- RecordSource = "Test"
- Top = 4215
- Width = 2430
- End
- Begin CUAEdit txt1
- BorderStyle = 3 'Inset
- DataField = "TEXT"
- DataSource = "Data1"
- Height = 300
- Index = 5
- Left = 225
- TabIndex = 10
- Text = "Text 30"
- Top = 3210
- Width = 1500
- End
- Begin CUAEdit txt2
- BorderStyle = 3 'Inset
- DataField = "TAL"
- DataSource = "Data1"
- Height = 300
- Left = 225
- TabIndex = 12
- Text = "Long"
- Top = 3540
- Width = 1500
- End
- Begin CUAEdit txt3
- BorderStyle = 3 'Inset
- DataField = "DATUM"
- DataSource = "Data1"
- Height = 300
- Left = 225
- TabIndex = 14
- Text = "Datum"
- Top = 3870
- Width = 1500
- End
- Begin CUAEdit txt1
- BorderStyle = 3 'Inset
- Height = 300
- Index = 4
- Left = 240
- TabIndex = 8
- Text = "Validerad"
- Top = 2505
- Width = 1215
- End
- Begin CUAEdit txt1
- BorderStyle = 3 'Inset
- Height = 300
- Index = 3
- Left = 240
- TabIndex = 6
- Text = "0"
- Top = 2160
- Type = 1 'Integer
- Width = 1215
- End
- Begin CUAEdit txt1
- BorderStyle = 3 'Inset
- Case = 2 'Upper Case
- Height = 300
- Index = 2
- Left = 240
- TabIndex = 4
- Text = "UPPERCASE"
- Top = 1800
- Width = 1215
- End
- Begin CUAEdit txt1
- BorderStyle = 3 'Inset
- Height = 300
- Index = 1
- Left = 240
- Mask = "### ##"
- TabIndex = 2
- Text = "### ##"
- Top = 1455
- Width = 1215
- End
- Begin CUAEdit txt1
- Height = 300
- Index = 0
- Left = 240
- ReadOnly = -1 'True
- TabIndex = 0
- Text = "ReadOnly"
- Top = 1110
- Width = 1215
- End
- Begin CUACommand cmdOK
- Cancel = -1 'True
- Caption = "OK"
- Default = -1 'True
- Height = 345
- Left = 5145
- StandardButton = 1 'OK
- TabIndex = 18
- Top = 60
- Width = 1260
- End
- Begin CUALabel lbl
- Caption = "Thes text boxes are all connected to a field in a data base. Maximum allowed length and data type are set automagically."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000080&
- Height = 630
- Index = 5
- Left = 3420
- TabIndex = 17
- Top = 3315
- Width = 3030
- End
- Begin CUALabel lbl
- Caption = "Validated, must be between 1 and 1000."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 4
- Left = 1680
- TabIndex = 9
- Top = 2550
- Width = 3360
- End
- Begin CUALabel lbl
- Caption = "Accepts only integers."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 3
- Left = 1680
- TabIndex = 7
- Top = 2205
- Width = 1770
- End
- Begin CUALabel lbl
- Caption = "Uppercase, capitalizes all input."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 2
- Left = 1680
- TabIndex = 5
- Top = 1860
- Width = 3720
- End
- Begin CUALabel lbl
- Caption = "Formatted entry of a Swedish ZIP code"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 1
- Left = 1680
- TabIndex = 3
- Top = 1515
- Width = 3480
- End
- Begin CUALabel lbl
- Caption = "ReadOnly, but works with the clip board."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 0
- Left = 1680
- TabIndex = 1
- Top = 1155
- Width = 4335
- End
- Begin Line Line1
- X1 = 300
- X2 = 6135
- Y1 = 3000
- Y2 = 3000
- End
- Option Explicit
- Sub cmdOK_Click ()
- Unload Me
- End Sub
- Sub Data1_Error (DataErr As Integer, Response As Integer)
- Response = 0
- End Sub
- Sub Form_Load ()
- Data1.DatabaseName = DatabaseName
- End Sub
- Sub txt1_Validate (Index As Integer, Cancel As Integer)
- Dim Number
- If Index = 4 Then
- Number = Val(txt1(4))
- Cancel = (Number < 1 Or Number > 1000)
- End If
- End Sub
-